package fr.upmc.tep.lambda.evaluation.applet;

import fr.upmc.tep.lambda.evaluation.exceptions.TypeException;
import fr.upmc.tep.lambda.evaluation.types.LTree;
import fr.upmc.tep.lambda.evaluation.util.LParser;
import fr.upmc.tep.lambda.evaluation.util.LReduction;

public class LApplet {

	public static void main (String[] args) {
		
		LParser p;
		LReduction r;
		
//		//TEST PARSER//
//		try {
//			p = new LParser("(lxyz.xz(yz))(lxy.x)(lxy.x)");
//			System.out.println("Display:" + p.getTree().display());			
//		} catch (TypeException e) {}
		
		//TEST REDUCTION//
		try {
			p = new LParser("(lx.xx)(lxy.xy)");
			System.out.println("Display:" + p.getTree().display());	
			LTree t = p.getTree();
			r = new LReduction();
			t = r.reduction(t);
			System.out.println("Reduction:" + t.display());
		} catch (TypeException e) {}
	}
}
